package com.franklin.ideaplugin.maphelper.resolver.impl.collection;

import com.franklin.ideaplugin.api.beans.variable.IVariable;
import com.franklin.ideaplugin.maphelper.beans.colmember.IColMember;
import com.franklin.ideaplugin.maphelper.resolver.impl.AbstractNewExpressionColMemberResolver;
import com.franklin.ideaplugin.maphelper.utils.PsiCollectionUtils;
import com.intellij.psi.PsiCodeBlock;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author Franklin
 * @since 2024/03/09 11:28
 */
public class CollectionNewExpressionColMemberResolver extends AbstractNewExpressionColMemberResolver implements ICollectionMemberResolver{

    public final static CollectionNewExpressionColMemberResolver INSTANCE = new CollectionNewExpressionColMemberResolver();

    @Override
    protected List<IColMember> findMemberInCodeBlock(IVariable variable, @Nullable PsiCodeBlock psiCodeBlock) {
        return PsiCollectionUtils.findCollectionMemberInCodeBlock(variable, psiCodeBlock);
    }
}
